<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num = prompt('输入一个三位数');
        var yi = prompt(num / 100);
        var er = prompt(num / 10) % 10;
        var san = num % 10;
        console.log("百位：" + yi + ";十位:" + er + ";个位：" + san);
    </script>
</head>

<body>

</body>

</html>